public class Test {
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        System.out.println(mySingleList.kthTolast(2));
    }
    public static void main8(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        MySingleList.ListNode ret = mySingleList.middleMode();
        System.out.println(ret.val);
    }
    public static void main7(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.addLast(11);
        mySingleList.addLast(21);
        mySingleList.addLast(31);
        mySingleList.reverseList();
        mySingleList.display();
    }
    public static void main6(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        mySingleList.clear();
        mySingleList.display();
    }
    public static void main5(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        mySingleList.remove(34);
        mySingleList.display();
    }
    public static void main4(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        mySingleList.addIndex(3,21);
        mySingleList.display();
    }
    public static void main3(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        mySingleList.addLast(200);
        mySingleList.display();
    }
    public static void main2(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        mySingleList.addFirst(100);
        mySingleList.display();
    }
    public static void main1(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        mySingleList.display();
        int r = mySingleList.size();
        System.out.println(r);
        System.out.println(mySingleList.contains(43));
    }
}
